if (arcpt2 && arcpt2->latitude != BADVAL && arcpt2->longitude != BADVAL &&
(ptsopt || (arcpt1 &&
(arcpt1->latitude != BADVAL && arcpt1->longitude != BADVAL)))) {
+#if NEWQ
+ foreach(waypoint* waypointp, waypt_list) {
+#else
QUEUE_FOR_EACH(&waypt_head, elem, tmp) {
-
waypointp = (waypoint*) elem;
+#endif
if (waypointp->extra_data) {
ed = (extra_data*) waypointp->extra_data;
} else {
}
removed = 0;
+#if NEWQ
+ foreach(waypoint* wp, waypt_list) {
+#else
QUEUE_FOR_EACH(&waypt_head, elem, tmp) {
waypoint* wp = (waypoint*) elem;
+#endif
extra_data* ed;
ed = (extra_data*) wp->extra_data;
wp->extra_data = NULL;
fileline);
} else if (lat1 != BADVAL && lon1 != BADVAL &&
lat2 != BADVAL && lon2 != BADVAL) {
+#if NEWQ
+ foreach(waypoint* waypointp, waypt_list) {
+#else
QUEUE_FOR_EACH(&waypt_head, elem, tmp) {
-
waypointp = (waypoint *)elem;
+#endif
if (waypointp->extra_data) {
ed = (extra_data *) waypointp->extra_data;
} else {
}
gbfclose(file_in);
+#if NEWQ
+ foreach(waypoint* wp, waypt_list) {
+#else
QUEUE_FOR_EACH(&waypt_head, elem, tmp) {
waypoint *wp = (waypoint *) elem;
+#endif
ed = (extra_data *) wp->extra_data;
wp->extra_data = NULL;
if (ed) {
int i, wc;
queue temp_head;
route_head *rte_head = NULL;
-
+#if NEWQ
+ foreach(waypoint* waypointp, waypt_list) {
+#else
QUEUE_FOR_EACH(&waypt_head, elem, tmp) {
- extra_data *ed;
-
waypointp = (waypoint *)elem;
+#endif
dist = gc_distance(waypointp->latitude,
waypointp->longitude,
home_pos->latitude,
continue;
}
- ed = (extra_data *) xcalloc(1, sizeof(*ed));
+ extra_data *ed = (extra_data *) xcalloc(1, sizeof(*ed));
ed->distance = dist;
waypointp->extra_data = ed;
}